﻿using BLL;
using Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1.WebUI
{
    public partial class WebForm2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            UserModel model = new UserModel();
            model.clientid = TextBox1.Text;
            model.cardid = TextBox2.Text;
            model.name = TextBox3.Text;
            model.phone = TextBox4.Text; 
            model.address = TextBox5.Text;
            model.moneynum = double.Parse(TextBox6.Text);
            model.pwd = TextBox7.Text;
            if (UserManage.Kaihu(model))
            {
                //开户成功
                Response.Write("<script>alert('开户成功')</script>");
            }
            else
            {
                //开户失败
                Response.Write("<script>alert('开户失败')</script>");
            }
        }
    }
}